package com.hzqy.persistence.dao.sensitive;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.SysSensitiveWordsVo;

@Repository
public class SensitiveWordsDao extends PersistenceDao<SysSensitiveWordsVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	
	public int findSensitiveCount(SysSensitiveWordsVo sysSensitiveWordsVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "findSensitiveCount", sysSensitiveWordsVo);
	}
	
	public List<SysSensitiveWordsVo> findSensitiveList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "findSensitiveList", map);
	}
	
	public int insertSensitive(SysSensitiveWordsVo sysSensitiveWordsVo) {
		return getSqlSession().insert(this.getNamespace() + "insertSensitive", sysSensitiveWordsVo);
	}
	
	public int deleteSensitive(int f_ssw_id) {
		String namespace = this.getNamespace();
		return getSqlSession().update(namespace + "deleteSensitive", f_ssw_id);
	}
	
	public SysSensitiveWordsVo selectSensitive(int f_ssw_id) {
		return getSqlSession().selectOne(this.getNamespace() + "selectSensitive", f_ssw_id);
	}
	
	public int updateSensitive(SysSensitiveWordsVo sysSensitiveWordsVo) {
		return getSqlSession().update(this.getNamespace() + "updateSensitive", sysSensitiveWordsVo);
	}
	
	public int reviewSensitive(SysSensitiveWordsVo sysSensitiveWordsVo) {
		return getSqlSession().update(this.getNamespace() + "reviewSensitive",sysSensitiveWordsVo);
	}
	
	public List<String> selectAllSevsitiveWords(Map<String, Object> map){
		return getSqlSession().selectList(this.getNamespace() + "selectAllSevsitiveWords", map);
	}
	
	
}
